package com.neusoft.weekreport.component.controller;

import com.neusoft.weekreport.component.bizService.LoginBizService;
import com.neusoft.weekreport.component.req.LoginReq;
import com.neusoft.weekreport.component.resp.LoginResp;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@EnableTransactionManagement
@RequestMapping("/login")
public class LoginController {

    @Resource
    LoginBizService loginBizService;

    @RequestMapping(value = "/login", method = RequestMethod.GET)

    public LoginResp login(LoginReq req) {
        LoginResp resp = new LoginResp();
        try {
            resp = loginBizService.getMsUser(req);
        } catch (Exception e) {

        }

        return resp;
    }
}
